import java.io.IOException;
import java.io.PrintWriter;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.Scanner;


public class Server {


	public static void main(String[] args) throws IOException {
		ServerSocket serverSocket = new ServerSocket(8080);
		Socket socket = serverSocket.accept();
		System.out.println("Server Started");
		
		Scanner socketIn = new Scanner(socket.getInputStream());
		PrintWriter socketOut = new PrintWriter(socket.getOutputStream(), true);
		
		
		while (true)
		{
			try {
				String line = socketIn.nextLine();
				System.out.println(line);
			}
			catch(Exception e)
			{
				
			}
			 
		}
	}
}
